home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
ShareMailGiftware
/
AmigaTalk
/
testfiles
/
TestPrinter
< prev
next >
Wrap
Text File
|
2002-10-27
|
2KB
|
97 lines
prtCmds <- PrtCommands new
myPrt <- PrinterDevice new
myPrt open: 'TestThePrinter'
myPrt reset
myPrt nlqOn
myPrt setTopMargin: 5
finePrt <- prtCmds at: #aSHORP4
myPrt sendExtendedCmd: finePrt parm1: 0 parm2: 0 parm3: 0 parm4: 0
myPrt write: 'Fine Print!' ofLength: 11
myPrt crlf
myPrt setLeftMargin: 20
myPrt write: '(Fine Print 2)' ofLength: 14
myPrt superScriptOn
myPrt write: 'superScript!' ofLength: 12
myPrt superScriptOff
myPrt normalizeLine
myPrt nlqOff
myPrt crlf
myPrt normalPitch
myPrt write: 'Normal Pitch!' ofLength: 13
myPrt crlf
myPrt italicsOn
myPrt write: 'Italicized Text!' ofLength: 16
myPrt italicsOff
myPrt crlf
myPrt underlineOn
myPrt write: 'Underlined Text!' ofLength: 16
myPrt underlineOff
myPrt crlf
myPrt boldOn
myPrt write: 'BoldFaced Text!' ofLength: 15
myPrt boldOff
myPrt crlf
chk <- myPrt query
( 'Printer status was: ', (chk asString) ) print
chk <- myPrt getPrinterName
( 'Printer Driver name is: ', chk ) print
chk <- myPrt getPrinterClassString
( 'Printer Class is: ', chk ) print
chk <- myPrt getNumberOfCharSets
( 'Printer has ', (chk asString), ' character sets.' ) print
myPrt setTabs: 10 t2: 20 t3: 30 t4: 04
tab <- <primitive 96 9>
myPrt asyncWrite: tab ofLength: 1
myPrt asyncWrite: tab ofLength: 1
myPrt condensedPitchOn
myPrt asyncWrite: 'asyncWrite: test' ofLength: 16
myPrt crlf
myPrt clearTabs
myPrt asyncWrite: 'asyncWrite: test' ofLength: 16
myPrt crlf
myPrt crlf
myPrt crlf
myPrt initialize: '@Mp'
myPrt write: 'Elite proportional italic' ofLength: 26
myPrt sendFormFeed
myPrt flush
myPrt close